-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Editor: Highlight list view blocks when canvas blocks are hovered #29103
Site Editor: Highlight list view blocks when canvas blocks are hovered #29103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of wrinkles with the code, and this definitely isn't a final draft of what we'll deliver (See To-dos in the PR description). Looking for more general feedback on the approach and if this is what you had in mind @Copons
Size Change: +60 B (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
I've been mulling over this for a long time, and I'm still not exactly sure if this is the right way to go. My doubt can be boiled down to: what's the difference between "highlight" and "hover"? On a technical level, the highlight is tracked with Redux, while the hover is handled via internal state (via hook, but that's irrelevant). In this PR (and in my initial experiment as well), we are setting a block highlighted on hover, which in turn means that hovering on a block will make it both hovered and highlighted. Do we need both states? I've got a draft (#29005) that moves the block hover state to Redux, basically mirroring the highlight behaviour. Besides the question about highlight/hover, I also wonder if dispatching on every mouseover and mouseout might be a performance issue. 🤔 |
Completely agree with posing this question. I had some confusion while coding out this PR, but couldn't quite verbalize what was "off". Gonna give this more thought 🤔
👍
Yep! Noted it in the PR description -- it's a concern for me as well. I don't have any great answers yet. |
Closing this PR in favor of Jacopo's similar draft #29005 (although, as discussed, we might go a different route altogether) |
Description
See the GIF below for more context.
How has this been tested?
Screenshots
To-dos
highlightBlocksOnHover
propTypes of changes
New feature that addresses #28699 and builds on top of #28637
Checklist: